/* *****************************************************************************************
 
Made by www.Flashphoner.com, all rights reserved.
These sources can only be used for working with Flashphoner server.
If you want use this to create your own application (separate from Flashphoner server) ? 
please contact support@flashphoner.com 

******************************************************************************************/

package com.flashphoner.api.js
{
	import com.flashphoner.api.Call;
	import com.flashphoner.api.interfaces.APINotify;
	
	import flash.external.ExternalInterface;
	
	/**
	 * Implementaion interface for js-phones
	 **/
	public class APINotifyJS implements APINotify
	{
		public function APINotifyJS()
		{
		}
		public function notifyCloseConnection():void{
			ExternalInterface.call("notifyCloseConnection");
		}
		public function notifyConnected():void{
			ExternalInterface.call("notifyConnected");
		}
		public function notifyRegistered(_sipObject:Object):void{
			ExternalInterface.call("notifyRegistered");
		}
		public function notifyBalance(balance:Number,_sipObject:Object):void{
			ExternalInterface.call("notifyBalance",String(balance));
		}
		public function notify(call:Call,_sipObject:Object):void{
			ExternalInterface.call("notify",call);
		}
		public function notifyCallbackHold(call:Call,isHold:Boolean):void{
			ExternalInterface.call("notifyCallbackHold",isHold);
		}
		
		public function notifyCost(call:Call,cost:Number):void{
			ExternalInterface.call("notifyCost",call,String(cost));
		}
		public function notifyCall(call:Call,_sipObject:Object):void{
			ExternalInterface.call("notifyCall",call);
		}
		public function notifyError(error:String,_sipObject:Object = null):void{
			ExternalInterface.call("notifyError",error);
		}
		
		public function notifyVideoFormat(call:Call,_sipObject:Object = null):void{
			//todo implement
		}


	}
}